package com.cxria.problem.service

import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.security.crypto.password.PasswordEncoder
import org.springframework.test.context.junit4.SpringRunner

@RunWith(SpringRunner.class)
@SpringBootTest
class UserServiceTest {

    @Autowired
    PasswordEncoder passwordHelper

    @Test
    void passwordEncode(){
        String oldPassword = "maomao"
        String newPassword = passwordHelper.encode(oldPassword)
        System.out.println(newPassword)
    }

}
